TARGET=../../bin/user_server
OBJDIR=../tmp

SRC=$(shell echo *.cpp ../common/*.cpp ../network/*.cpp ../protocol/*.cc)
OBJ:=$(patsubst %.cpp,%.o,$(SRC))
OBJ:=$(patsubst %.cc,%.o,$(OBJ))

INC=-I..
LIBS=-llog4cplus -lboost_system -lboost_filesystem -lprotobuf

CFLAGS:=-m64 -g -O3 -lrt $(INC)
CPPFLAGS:=$(CFLAGS) -std=c++0x

all:$(TARGET)

$(TARGET):$(OBJ)
	$(CXX) $^ $(LIBS) -o $@

clean:
	rm -rf $(TARGET)
	rm -rf $(OBJ)
